package game;

import java.awt.image.BufferedImage;

/**
 * 我的飞机类
 *
 * @author zl
 */
public class MyPlane
        extends FlyObeject {
    int hp;
    BufferedImage image;
    public MyPlane() {
        img = GetPicture.getImg("/picture/Plane03.png");
        image = GetPicture.getImg("/picture/point.png");
        x = 200;
        y = 600;
        w = img.getWidth();
        h = img.getHeight();
        hp = 3;
    }

    public void moveToMouse(int mx, int my) {
        x = mx - w / 2;
        y = my - h / 2;
    }

    public void moveUp() {
        y -= 30;
    }

    public void moveDown() {
        y += 30;
    }

    public void moveLeft() {
        x -= 30;
    }

    public void moveRight() {
        x += 30;
    }
}
